<template>
  <div>
    <div>
      <el-menu class="sub-menu" mode="horizontal" :default-active="MsgActiveRouter" router>
        <el-menu-item index="Push" :route="{name:'Push'}" class="el-icon-coin">消息推送</el-menu-item>
        <el-menu-item index="Sop" :route="{name:'Sop'}" class="el-icon-data-analysis">SOP计划</el-menu-item>
      </el-menu>
    </div>
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "MsgLayout",
  data() {
    return {
      MsgActiveRouter: '',
    }
  },
  mounted() {
    this.MsgActiveRouter = this.$route.matched[2].name;
  }
}
</script>

<style scoped>
.sub-menu .el-menu-item {
  line-height: 40px;
  height: 40px;
  vertical-align: middle;
  font-size: 13px;
}

.sub-menu .el-menu-item i {
  margin-top: -3px;
}
</style>